
################################################################################
# Start File: Construct Validity - Item Response Theory 
################################################################################

rm(list=ls()) # removes all objects 
getwd() # check if working in root file

# Libraries ----
library(tidyverse) 
library(dplyr)
library(mirt) 
library(stargazer) 
library(flextable) 
library(psych)
library(ggmirt) 
library(RColorBrewer) 

# Process raw data ----
source("2_IRT_processdata.R") 

# Specify IRT models ----
source("3_IRT_modelspec.R") 

# Fit analyses with Tables ----
source("4_IRT_analysis.R") # Fit analyses with tables

# Tables ----
source("5_IRT_describe_items.R") # Descriptives of scale items

# Figures ----
source("6_IRT_lollipop.R") # Figure 2: Item parameters 
source("7_IRT_ItemInfoCurves.R") # Figures A1 & A2: Item information curves

